<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
<div class="layui-form timo-compile">
    <form th:action="@{/system/invoices/save}">
        <input type="hidden" name="id" th:if="${invoices}" th:value="${invoices.id}">
        <input type="hidden" name="name" th:if="${invoices}" th:value="${invoices.name}">
        <input type="hidden" name="memeberId" th:if="${invoices}" th:value="${invoices.memeberId}">
        <input type="hidden" name="applyDate" th:if="${invoices}" th:value="${invoices.applyDate}">
        <input type="hidden" name="invoiceDate" th:if="${invoices}" th:value="${invoices.invoiceDate}">
        <div class="layui-form-item">
            <label class="layui-form-label">企业名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="invoiceTitle" placeholder="请输入企业名称"
                       th:value="${invoices?.invoiceTitle}">
            </div>
            <label class="layui-form-label">企业代码</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="companyNum" placeholder="请输入企业代码"
                       th:value="${invoices?.companyNum}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">开户行</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="depositBank" placeholder="请输入开户行"
                       th:value="${invoices?.depositBank}">
            </div>
            <label class="layui-form-label">银行账户</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="bankAccount" placeholder="请输入银行账户"
                       th:value="${invoices?.bankAccount}">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="phone" placeholder="请输入电话"
                       th:value="${invoices?.phone}">
            </div>
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="email" placeholder="请输入邮箱"
                       th:value="${invoices?.email}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">发票金额</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="invoiceValue" placeholder="请输入发票金额"
                       th:value="${invoices?.invoiceValue}">
            </div>
            <label class="layui-form-label">地址</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="true" type="text" name="address" placeholder="请输入地址"
                       th:value="${invoices?.address}">
            </div>
        </div>

        <div class="layui-form-item" th:method=POST>
            <label class="layui-form-label ">发票文件</label>
            <div class="layui-input-inline ">
                <button id="PDF" type="button" class="layui-btn upload-file" name="invoiceFile"
                        th:attr="up-url=@{/upload/file}"
                        up-field="path">
                    <i class="layui-icon">&#xe67c;</i>上传文件
                </button>
                <div class="upload-show-pdf">
                    <div class='upload-item'>
                        <input type="hidden" name="invoiceFile" th:value="${invoices?.invoiceFile}"/>
                        [[${invoices?.invoiceFile}]]
                    </div>
                </div>
            </div>
            <label class="layui-form-label">发票状态</label>
            <div class="layui-input-inline">
                <select class="timo-search-select" name="invoiceStatus" mo:dict="invoiceStatus"
                        mo-selected="${invoices?.invoiceStatus}" mo-empty=""
                        lay-verify="type"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发票类型</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="hidden" name="invoiceType" th:value="${invoices.invoiceType}">
                <input class="layui-input" type="text" readonly="true"
                       th:value="${#dicts.keyValue('invoiceType',invoices.invoiceType)}">

            </div>
            <label class="layui-form-label">发票号</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="invoiceNo" placeholder="请输入发票号"
                       th:value="${invoices?.invoiceNo}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">驳回原因</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="rejectionReason">[[${invoices?.rejectionReason}]]</textarea>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea"
                          name="remark">[[${invoices?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>